Parse a string to float or integerΒΆ

Parse a string to float or integer.
n = "246.2458"

print(float(n))
print(int(float(n)))

Output:

246.2458
246